﻿#include "qr_processdatamanager.h"

QR_ProcessDataManager::QR_ProcessDataManager(QObject *parent)
    : QObject{parent}
{

}

bool QR_ProcessDataManager::isExistTable()
{
    QR_ProcessDB Db;

    QString sql = "SELECT ID, LC_Value,LeftAngle,RightAngle,Count FROM QR_ProcessDB;";

    bool ok = Db.execSql(sql);
    if(!ok)
    {
        qDebug()<<"Cpp:不存在数据库表 QR_ProcessDB";

        sql = "CREATE TABLE QR_ProcessDB (ID INTEGER PRIMARY KEY ,LC_Value TEXT,LeftAngle TEXT,RightAngle TEXT,Count TEXT);";
        qDebug()<<"Cpp:创建数据表 QR_ProcessDB sql:"<<sql;
        bool ok = Db.execSql(sql);
        if(ok)
        {
            qDebug()<<"Cpp:创建数据表 QR_ProcessDB 成功";

            for(int i = 0 ; i <20; i++)
            {
                addData();
            }

            for(int i =0 ;i < 20; i++)
            {
                saveData((i+1),"LC_VALUE","0");
                saveData((i+1),"LeftAngle","45");
                saveData((i+1),"RightAngle","45");
                saveData((i+1),"Count","0");
            }
        }
        else
        {
            qDebug()<<"Cpp:创建数据表 QR_ProcessDB 失败";
            return false;
        }
    }
    else
    {
        getAllParameterFromSQL();
    }

    return true;
}

void QR_ProcessDataManager::getAllParameterFromSQL()
{

    QR_ProcessDB Db;

    QSharedPointer<QSqlQuery> result;

    QString sql = "SELECT ID, LC_Value,LeftAngle,RightAngle,Count FROM QR_ProcessDB ;";

    QString lc_Value;
    QString leftAngle;
    QString rightAngle;
    QString count;

    result.reset(Db.execSql_result(sql));
    if(!result.isNull())
    {
        while(result->next())
        {

            int id = result->value(0).toInt();

            switch(id)
            {
            case 1:
                lc_Value = result->value(1).toString();
                leftAngle = result->value(2).toString();
                rightAngle = result->value(3).toString();
                count = result->value(4).toString();
                setLC_Value01(lc_Value);
                setLeftAngle01(leftAngle);
                setRightAngle01(rightAngle);
                setCount01(count);
                break;
            case 2 :
                lc_Value = result->value(1).toString();
                leftAngle = result->value(2).toString();
                rightAngle = result->value(3).toString();
                count = result->value(4).toString();
                setLC_Value02(lc_Value);
                setLeftAngle02(leftAngle);
                setRightAngle02(rightAngle);
                setCount02(count);
                break;
            case 3:
                lc_Value = result->value(1).toString();
                leftAngle = result->value(2).toString();
                rightAngle = result->value(3).toString();
                count = result->value(4).toString();
                setLC_Value03(lc_Value);
                setLeftAngle03(leftAngle);
                setRightAngle03(rightAngle);
                setCount03(count);
                break;
            case 4:
                lc_Value = result->value(1).toString();
                leftAngle = result->value(2).toString();
                rightAngle = result->value(3).toString();
                count = result->value(4).toString();
                setLC_Value04(lc_Value);
                setLeftAngle04(leftAngle);
                setRightAngle04(rightAngle);
                setCount04(count);
                break;
            case 5:
                lc_Value = result->value(1).toString();
                leftAngle = result->value(2).toString();
                rightAngle = result->value(3).toString();
                count = result->value(4).toString();
                setLC_Value05(lc_Value);
                setLeftAngle05(leftAngle);
                setRightAngle05(rightAngle);
                setCount05(count);
                break;
            case 6:
                lc_Value = result->value(1).toString();
                leftAngle = result->value(2).toString();
                rightAngle = result->value(3).toString();
                count = result->value(4).toString();
                setLC_Value06(lc_Value);
                setLeftAngle06(leftAngle);
                setRightAngle06(rightAngle);
                setCount06(count);
                break;
            case 7:
                lc_Value = result->value(1).toString();
                leftAngle = result->value(2).toString();
                rightAngle = result->value(3).toString();
                count = result->value(4).toString();
                setLC_Value07(lc_Value);
                setLeftAngle07(leftAngle);
                setRightAngle07(rightAngle);
                setCount07(count);
                break;
            case 8:
                lc_Value = result->value(1).toString();
                leftAngle = result->value(2).toString();
                rightAngle = result->value(3).toString();
                count = result->value(4).toString();
                setLC_Value08(lc_Value);
                setLeftAngle08(leftAngle);
                setRightAngle08(rightAngle);
                setCount08(count);
                break;
            case 9:
                lc_Value = result->value(1).toString();
                leftAngle = result->value(2).toString();
                rightAngle = result->value(3).toString();
                count = result->value(4).toString();
                setLC_Value09(lc_Value);
                setLeftAngle09(leftAngle);
                setRightAngle09(rightAngle);
                setCount09(count);
                break;
            case 10:
                lc_Value = result->value(1).toString();
                leftAngle = result->value(2).toString();
                rightAngle = result->value(3).toString();
                count = result->value(4).toString();
                setLC_Value10(lc_Value);
                setLeftAngle10(leftAngle);
                setRightAngle10(rightAngle);
                setCount10(count);
                break;
            case 11:
                lc_Value = result->value(1).toString();
                leftAngle = result->value(2).toString();
                rightAngle = result->value(3).toString();
                count = result->value(4).toString();
                setLC_Value11(lc_Value);
                setLeftAngle11(leftAngle);
                setRightAngle11(rightAngle);
                setCount11(count);
                break;
            case 12:
                lc_Value = result->value(1).toString();
                leftAngle = result->value(2).toString();
                rightAngle = result->value(3).toString();
                count = result->value(4).toString();
                setLC_Value12(lc_Value);
                setLeftAngle12(leftAngle);
                setRightAngle12(rightAngle);
                setCount12(count);
                break;
            case 13:
                lc_Value = result->value(1).toString();
                leftAngle = result->value(2).toString();
                rightAngle = result->value(3).toString();
                count = result->value(4).toString();
                setLC_Value13(lc_Value);
                setLeftAngle13(leftAngle);
                setRightAngle13(rightAngle);
                setCount13(count);
                break;
            case 14:
                lc_Value = result->value(1).toString();
                leftAngle = result->value(2).toString();
                rightAngle = result->value(3).toString();
                count = result->value(4).toString();
                setLC_Value14(lc_Value);
                setLeftAngle14(leftAngle);
                setRightAngle14(rightAngle);
                setCount14(count);
                break;
            case 15:
                lc_Value = result->value(1).toString();
                leftAngle = result->value(2).toString();
                rightAngle = result->value(3).toString();
                count = result->value(4).toString();
                setLC_Value15(lc_Value);
                setLeftAngle15(leftAngle);
                setRightAngle15(rightAngle);
                setCount15(count);
                break;
            case 16:
                lc_Value = result->value(1).toString();
                leftAngle = result->value(2).toString();
                rightAngle = result->value(3).toString();
                count = result->value(4).toString();
                setLC_Value16(lc_Value);
                setLeftAngle16(leftAngle);
                setRightAngle16(rightAngle);
                setCount16(count);
                break;
            case 17:
                lc_Value = result->value(1).toString();
                leftAngle = result->value(2).toString();
                rightAngle = result->value(3).toString();
                count = result->value(4).toString();
                setLC_Value17(lc_Value);
                setLeftAngle17(leftAngle);
                setRightAngle17(rightAngle);
                setCount17(count);
                break;
            case 18:
                lc_Value = result->value(1).toString();
                leftAngle = result->value(2).toString();
                rightAngle = result->value(3).toString();
                count = result->value(4).toString();
                setLC_Value18(lc_Value);
                setLeftAngle18(leftAngle);
                setRightAngle18(rightAngle);
                setCount18(count);
                break;
            case 19:
                lc_Value = result->value(1).toString();
                leftAngle = result->value(2).toString();
                rightAngle = result->value(3).toString();
                count = result->value(4).toString();
                setLC_Value19(lc_Value);
                setLeftAngle19(leftAngle);
                setRightAngle19(rightAngle);
                setCount19(count);
                break;
            case 20:
                lc_Value = result->value(1).toString();
                leftAngle = result->value(2).toString();
                rightAngle = result->value(3).toString();
                count = result->value(4).toString();
                setLC_Value20(lc_Value);
                setLeftAngle20(leftAngle);
                setRightAngle20(rightAngle);
                setCount20(count);
                break;
            default:
                break;
            }

        }

        result.clear();
    }



}

void QR_ProcessDataManager::addData()
{
    QR_ProcessDB Db;

    QString sql = "INSERT INTO QR_ProcessDB (LC_Value , LeftAngle , RightAngle , Count) VALUES('','','','')";

    qDebug()<<"Cpp:插入数据 sql:"<<sql;

    bool ok = Db.execSql(sql);
    if(!ok)
    {
        qDebug()<<"Cpp:添加数据失败";
    }
    else
    {
        qDebug()<<"Cpp:添加数据成功";
        getAllParameterFromSQL();
    }
}

void QR_ProcessDataManager::saveData(int id, QString key, QString value)
{
    QR_ProcessDB Db;

    QString sql = "UPDATE QR_ProcessDB SET " + key + "='"+ value +"' WHERE ID = "+QString::number(id);

    qDebug()<<"Cpp:更新数据 sql:"<<sql;

    bool ok = Db.execSql(sql);

    if(!ok)
    {
        qDebug()<<"Cpp:更新数据失败";
    }
    else
    {
        qDebug()<<"Cpp:更新数据成功";
    }
}

QString QR_ProcessDataManager::LC_Value01() const
{
    return m_LC_Value01;
}

void QR_ProcessDataManager::setLC_Value01(const QString &newLC_Value01)
{
    if (m_LC_Value01 == newLC_Value01)
        return;
    m_LC_Value01 = newLC_Value01;
    emit LC_Value01Changed();
}

QString QR_ProcessDataManager::LeftAngle01() const
{
    return m_LeftAngle01;
}

void QR_ProcessDataManager::setLeftAngle01(const QString &newLeftAngle01)
{
    if (m_LeftAngle01 == newLeftAngle01)
        return;
    m_LeftAngle01 = newLeftAngle01;
    emit LeftAngle01Changed();
}

QString QR_ProcessDataManager::RightAngle01() const
{
    return m_RightAngle01;
}

void QR_ProcessDataManager::setRightAngle01(const QString &newRightAngle01)
{
    if (m_RightAngle01 == newRightAngle01)
        return;
    m_RightAngle01 = newRightAngle01;
    emit RightAngle01Changed();
}

QString QR_ProcessDataManager::Count01() const
{
    return m_Count01;
}

void QR_ProcessDataManager::setCount01(const QString &newCount01)
{
    if (m_Count01 == newCount01)
        return;
    m_Count01 = newCount01;
    emit Count01Changed();
}

QString QR_ProcessDataManager::LC_Value02() const
{
    return m_LC_Value02;
}

void QR_ProcessDataManager::setLC_Value02(const QString &newLC_Value02)
{
    if (m_LC_Value02 == newLC_Value02)
        return;
    m_LC_Value02 = newLC_Value02;
    emit LC_Value02Changed();
}

QString QR_ProcessDataManager::LeftAngle02() const
{
    return m_LeftAngle02;
}

void QR_ProcessDataManager::setLeftAngle02(const QString &newLeftAngle02)
{
    if (m_LeftAngle02 == newLeftAngle02)
        return;
    m_LeftAngle02 = newLeftAngle02;
    emit LeftAngle02Changed();
}

QString QR_ProcessDataManager::RightAngle02() const
{
    return m_RightAngle02;
}

void QR_ProcessDataManager::setRightAngle02(const QString &newRightAngle02)
{
    if (m_RightAngle02 == newRightAngle02)
        return;
    m_RightAngle02 = newRightAngle02;
    emit RightAngle02Changed();
}

QString QR_ProcessDataManager::Count02() const
{
    return m_Count02;
}

void QR_ProcessDataManager::setCount02(const QString &newCount02)
{
    if (m_Count02 == newCount02)
        return;
    m_Count02 = newCount02;
    emit Count02Changed();
}

QString QR_ProcessDataManager::LC_Value03() const
{
    return m_LC_Value03;
}

void QR_ProcessDataManager::setLC_Value03(const QString &newLC_Value03)
{
    if (m_LC_Value03 == newLC_Value03)
        return;
    m_LC_Value03 = newLC_Value03;
    emit LC_Value03Changed();
}

QString QR_ProcessDataManager::LeftAngle03() const
{
    return m_LeftAngle03;
}

void QR_ProcessDataManager::setLeftAngle03(const QString &newLeftAngle03)
{
    if (m_LeftAngle03 == newLeftAngle03)
        return;
    m_LeftAngle03 = newLeftAngle03;
    emit LeftAngle03Changed();
}

QString QR_ProcessDataManager::RightAngle03() const
{
    return m_RightAngle03;
}

void QR_ProcessDataManager::setRightAngle03(const QString &newRightAngle03)
{
    if (m_RightAngle03 == newRightAngle03)
        return;
    m_RightAngle03 = newRightAngle03;
    emit RightAngle03Changed();
}

QString QR_ProcessDataManager::Count03() const
{
    return m_Count03;
}

void QR_ProcessDataManager::setCount03(const QString &newCount03)
{
    if (m_Count03 == newCount03)
        return;
    m_Count03 = newCount03;
    emit Count03Changed();
}

QString QR_ProcessDataManager::LC_Value04() const
{
    return m_LC_Value04;
}

void QR_ProcessDataManager::setLC_Value04(const QString &newLC_Value04)
{
    if (m_LC_Value04 == newLC_Value04)
        return;
    m_LC_Value04 = newLC_Value04;
    emit LC_Value04Changed();
}

QString QR_ProcessDataManager::LeftAngle04() const
{
    return m_LeftAngle04;
}

void QR_ProcessDataManager::setLeftAngle04(const QString &newLeftAngle04)
{
    if (m_LeftAngle04 == newLeftAngle04)
        return;
    m_LeftAngle04 = newLeftAngle04;
    emit LeftAngle04Changed();
}

QString QR_ProcessDataManager::RightAngle04() const
{
    return m_RightAngle04;
}

void QR_ProcessDataManager::setRightAngle04(const QString &newRightAngle04)
{
    if (m_RightAngle04 == newRightAngle04)
        return;
    m_RightAngle04 = newRightAngle04;
    emit RightAngle04Changed();
}

QString QR_ProcessDataManager::Count04() const
{
    return m_Count04;
}

void QR_ProcessDataManager::setCount04(const QString &newCount04)
{
    if (m_Count04 == newCount04)
        return;
    m_Count04 = newCount04;
    emit Count04Changed();
}

QString QR_ProcessDataManager::LC_Value05() const
{
    return m_LC_Value05;
}

void QR_ProcessDataManager::setLC_Value05(const QString &newLC_Value05)
{
    if (m_LC_Value05 == newLC_Value05)
        return;
    m_LC_Value05 = newLC_Value05;
    emit LC_Value05Changed();
}

QString QR_ProcessDataManager::LeftAngle05() const
{
    return m_LeftAngle05;
}

void QR_ProcessDataManager::setLeftAngle05(const QString &newLeftAngle05)
{
    if (m_LeftAngle05 == newLeftAngle05)
        return;
    m_LeftAngle05 = newLeftAngle05;
    emit LeftAngle05Changed();
}

QString QR_ProcessDataManager::RightAngle05() const
{
    return m_RightAngle05;
}

void QR_ProcessDataManager::setRightAngle05(const QString &newRightAngle05)
{
    if (m_RightAngle05 == newRightAngle05)
        return;
    m_RightAngle05 = newRightAngle05;
    emit RightAngle05Changed();
}

QString QR_ProcessDataManager::Count05() const
{
    return m_Count05;
}

void QR_ProcessDataManager::setCount05(const QString &newCount05)
{
    if (m_Count05 == newCount05)
        return;
    m_Count05 = newCount05;
    emit Count05Changed();
}

QString QR_ProcessDataManager::LeftAngle06() const
{
    return m_LeftAngle06;
}

void QR_ProcessDataManager::setLeftAngle06(const QString &newLeftAngle06)
{
    if (m_LeftAngle06 == newLeftAngle06)
        return;
    m_LeftAngle06 = newLeftAngle06;
    emit LeftAngle06Changed();
}

QString QR_ProcessDataManager::RightAngle06() const
{
    return m_RightAngle06;
}

void QR_ProcessDataManager::setRightAngle06(const QString &newRightAngle06)
{
    if (m_RightAngle06 == newRightAngle06)
        return;
    m_RightAngle06 = newRightAngle06;
    emit RightAngle06Changed();
}

QString QR_ProcessDataManager::Count06() const
{
    return m_Count06;
}

void QR_ProcessDataManager::setCount06(const QString &newCount06)
{
    if (m_Count06 == newCount06)
        return;
    m_Count06 = newCount06;
    emit Count06Changed();
}

QString QR_ProcessDataManager::LC_Value07() const
{
    return m_LC_Value07;
}

void QR_ProcessDataManager::setLC_Value07(const QString &newLC_Value07)
{
    if (m_LC_Value07 == newLC_Value07)
        return;
    m_LC_Value07 = newLC_Value07;
    emit LC_Value07Changed();
}

QString QR_ProcessDataManager::LeftAngle07() const
{
    return m_LeftAngle07;
}

void QR_ProcessDataManager::setLeftAngle07(const QString &newLeftAngle07)
{
    if (m_LeftAngle07 == newLeftAngle07)
        return;
    m_LeftAngle07 = newLeftAngle07;
    emit LeftAngle07Changed();
}

QString QR_ProcessDataManager::RightAngle07() const
{
    return m_RightAngle07;
}

void QR_ProcessDataManager::setRightAngle07(const QString &newRightAngle07)
{
    if (m_RightAngle07 == newRightAngle07)
        return;
    m_RightAngle07 = newRightAngle07;
    emit RightAngle07Changed();
}

QString QR_ProcessDataManager::Count07() const
{
    return m_Count07;
}

void QR_ProcessDataManager::setCount07(const QString &newCount07)
{
    if (m_Count07 == newCount07)
        return;
    m_Count07 = newCount07;
    emit Count07Changed();
}

QString QR_ProcessDataManager::LC_Value08() const
{
    return m_LC_Value08;
}

void QR_ProcessDataManager::setLC_Value08(const QString &newLC_Value08)
{
    if (m_LC_Value08 == newLC_Value08)
        return;
    m_LC_Value08 = newLC_Value08;
    emit LC_Value08Changed();
}

QString QR_ProcessDataManager::LeftAngle08() const
{
    return m_LeftAngle08;
}

void QR_ProcessDataManager::setLeftAngle08(const QString &newLeftAngle08)
{
    if (m_LeftAngle08 == newLeftAngle08)
        return;
    m_LeftAngle08 = newLeftAngle08;
    emit LeftAngle08Changed();
}

QString QR_ProcessDataManager::RightAngle08() const
{
    return m_RightAngle08;
}

void QR_ProcessDataManager::setRightAngle08(const QString &newRightAngle08)
{
    if (m_RightAngle08 == newRightAngle08)
        return;
    m_RightAngle08 = newRightAngle08;
    emit RightAngle08Changed();
}

QString QR_ProcessDataManager::Count08() const
{
    return m_Count08;
}

void QR_ProcessDataManager::setCount08(const QString &newCount08)
{
    if (m_Count08 == newCount08)
        return;
    m_Count08 = newCount08;
    emit Count08Changed();
}

QString QR_ProcessDataManager::LC_Value09() const
{
    return m_LC_Value09;
}

void QR_ProcessDataManager::setLC_Value09(const QString &newLC_Value09)
{
    if (m_LC_Value09 == newLC_Value09)
        return;
    m_LC_Value09 = newLC_Value09;
    emit LC_Value09Changed();
}

QString QR_ProcessDataManager::LeftAngle09() const
{
    return m_LeftAngle09;
}

void QR_ProcessDataManager::setLeftAngle09(const QString &newLeftAngle09)
{
    if (m_LeftAngle09 == newLeftAngle09)
        return;
    m_LeftAngle09 = newLeftAngle09;
    emit LeftAngle09Changed();
}

QString QR_ProcessDataManager::RightAngle09() const
{
    return m_RightAngle09;
}

void QR_ProcessDataManager::setRightAngle09(const QString &newRightAngle09)
{
    if (m_RightAngle09 == newRightAngle09)
        return;
    m_RightAngle09 = newRightAngle09;
    emit RightAngle09Changed();
}

QString QR_ProcessDataManager::Count09() const
{
    return m_Count09;
}

void QR_ProcessDataManager::setCount09(const QString &newCount09)
{
    if (m_Count09 == newCount09)
        return;
    m_Count09 = newCount09;
    emit Count09Changed();
}

QString QR_ProcessDataManager::LC_Value10() const
{
    return m_LC_Value10;
}

void QR_ProcessDataManager::setLC_Value10(const QString &newLC_Value10)
{
    if (m_LC_Value10 == newLC_Value10)
        return;
    m_LC_Value10 = newLC_Value10;
    emit LC_Value10Changed();
}

QString QR_ProcessDataManager::LeftAngle10() const
{
    return m_LeftAngle10;
}

void QR_ProcessDataManager::setLeftAngle10(const QString &newLeftAngle10)
{
    if (m_LeftAngle10 == newLeftAngle10)
        return;
    m_LeftAngle10 = newLeftAngle10;
    emit LeftAngle10Changed();
}

QString QR_ProcessDataManager::RightAngle10() const
{
    return m_RightAngle10;
}

void QR_ProcessDataManager::setRightAngle10(const QString &newRightAngle10)
{
    if (m_RightAngle10 == newRightAngle10)
        return;
    m_RightAngle10 = newRightAngle10;
    emit RightAngle10Changed();
}

QString QR_ProcessDataManager::Count10() const
{
    return m_Count10;
}

void QR_ProcessDataManager::setCount10(const QString &newCount10)
{
    if (m_Count10 == newCount10)
        return;
    m_Count10 = newCount10;
    emit Count10Changed();
}

QString QR_ProcessDataManager::LC_Value11() const
{
    return m_LC_Value11;
}

void QR_ProcessDataManager::setLC_Value11(const QString &newLC_Value11)
{
    if (m_LC_Value11 == newLC_Value11)
        return;
    m_LC_Value11 = newLC_Value11;
    emit LC_Value11Changed();
}

QString QR_ProcessDataManager::LeftAngle11() const
{
    return m_LeftAngle11;
}

void QR_ProcessDataManager::setLeftAngle11(const QString &newLeftAngle11)
{
    if (m_LeftAngle11 == newLeftAngle11)
        return;
    m_LeftAngle11 = newLeftAngle11;
    emit LeftAngle11Changed();
}

QString QR_ProcessDataManager::RightAngle11() const
{
    return m_RightAngle11;
}

void QR_ProcessDataManager::setRightAngle11(const QString &newRightAngle11)
{
    if (m_RightAngle11 == newRightAngle11)
        return;
    m_RightAngle11 = newRightAngle11;
    emit RightAngle11Changed();
}

QString QR_ProcessDataManager::Count11() const
{
    return m_Count11;
}

void QR_ProcessDataManager::setCount11(const QString &newCount11)
{
    if (m_Count11 == newCount11)
        return;
    m_Count11 = newCount11;
    emit Count11Changed();
}

QString QR_ProcessDataManager::LC_Value12() const
{
    return m_LC_Value12;
}

void QR_ProcessDataManager::setLC_Value12(const QString &newLC_Value12)
{
    if (m_LC_Value12 == newLC_Value12)
        return;
    m_LC_Value12 = newLC_Value12;
    emit LC_Value12Changed();
}

QString QR_ProcessDataManager::LeftAngle12() const
{
    return m_LeftAngle12;
}

void QR_ProcessDataManager::setLeftAngle12(const QString &newLeftAngle12)
{
    if (m_LeftAngle12 == newLeftAngle12)
        return;
    m_LeftAngle12 = newLeftAngle12;
    emit LeftAngle12Changed();
}

QString QR_ProcessDataManager::RightAngle12() const
{
    return m_RightAngle12;
}

void QR_ProcessDataManager::setRightAngle12(const QString &newRightAngle12)
{
    if (m_RightAngle12 == newRightAngle12)
        return;
    m_RightAngle12 = newRightAngle12;
    emit RightAngle12Changed();
}

QString QR_ProcessDataManager::Count12() const
{
    return m_Count12;
}

void QR_ProcessDataManager::setCount12(const QString &newCount12)
{
    if (m_Count12 == newCount12)
        return;
    m_Count12 = newCount12;
    emit Count12Changed();
}

QString QR_ProcessDataManager::LC_Value13() const
{
    return m_LC_Value13;
}

void QR_ProcessDataManager::setLC_Value13(const QString &newLC_Value13)
{
    if (m_LC_Value13 == newLC_Value13)
        return;
    m_LC_Value13 = newLC_Value13;
    emit LC_Value13Changed();
}

QString QR_ProcessDataManager::LeftAngle13() const
{
    return m_LeftAngle13;
}

void QR_ProcessDataManager::setLeftAngle13(const QString &newLeftAngle13)
{
    if (m_LeftAngle13 == newLeftAngle13)
        return;
    m_LeftAngle13 = newLeftAngle13;
    emit LeftAngle13Changed();
}

QString QR_ProcessDataManager::RightAngle13() const
{
    return m_RightAngle13;
}

void QR_ProcessDataManager::setRightAngle13(const QString &newRightAngle13)
{
    if (m_RightAngle13 == newRightAngle13)
        return;
    m_RightAngle13 = newRightAngle13;
    emit RightAngle13Changed();
}

QString QR_ProcessDataManager::Count13() const
{
    return m_Count13;
}

void QR_ProcessDataManager::setCount13(const QString &newCount13)
{
    if (m_Count13 == newCount13)
        return;
    m_Count13 = newCount13;
    emit Count13Changed();
}

QString QR_ProcessDataManager::LC_Value14() const
{
    return m_LC_Value14;
}

void QR_ProcessDataManager::setLC_Value14(const QString &newLC_Value14)
{
    if (m_LC_Value14 == newLC_Value14)
        return;
    m_LC_Value14 = newLC_Value14;
    emit LC_Value14Changed();
}

QString QR_ProcessDataManager::LeftAngle14() const
{
    return m_LeftAngle14;
}

void QR_ProcessDataManager::setLeftAngle14(const QString &newLeftAngle14)
{
    if (m_LeftAngle14 == newLeftAngle14)
        return;
    m_LeftAngle14 = newLeftAngle14;
    emit LeftAngle14Changed();
}

QString QR_ProcessDataManager::RightAngle14() const
{
    return m_RightAngle14;
}

void QR_ProcessDataManager::setRightAngle14(const QString &newRightAngle14)
{
    if (m_RightAngle14 == newRightAngle14)
        return;
    m_RightAngle14 = newRightAngle14;
    emit RightAngle14Changed();
}

QString QR_ProcessDataManager::Count14() const
{
    return m_Count14;
}

void QR_ProcessDataManager::setCount14(const QString &newCount14)
{
    if (m_Count14 == newCount14)
        return;
    m_Count14 = newCount14;
    emit Count14Changed();
}

QString QR_ProcessDataManager::LC_Value15() const
{
    return m_LC_Value15;
}

void QR_ProcessDataManager::setLC_Value15(const QString &newLC_Value15)
{
    if (m_LC_Value15 == newLC_Value15)
        return;
    m_LC_Value15 = newLC_Value15;
    emit LC_Value15Changed();
}

QString QR_ProcessDataManager::LeftAngle15() const
{
    return m_LeftAngle15;
}

void QR_ProcessDataManager::setLeftAngle15(const QString &newLeftAngle15)
{
    if (m_LeftAngle15 == newLeftAngle15)
        return;
    m_LeftAngle15 = newLeftAngle15;
    emit LeftAngle15Changed();
}

QString QR_ProcessDataManager::RightAngle15() const
{
    return m_RightAngle15;
}

void QR_ProcessDataManager::setRightAngle15(const QString &newRightAngle15)
{
    if (m_RightAngle15 == newRightAngle15)
        return;
    m_RightAngle15 = newRightAngle15;
    emit RightAngle15Changed();
}

QString QR_ProcessDataManager::Count15() const
{
    return m_Count15;
}

void QR_ProcessDataManager::setCount15(const QString &newCount15)
{
    if (m_Count15 == newCount15)
        return;
    m_Count15 = newCount15;
    emit Count15Changed();
}

QString QR_ProcessDataManager::LC_Value16() const
{
    return m_LC_Value16;
}

void QR_ProcessDataManager::setLC_Value16(const QString &newLC_Value16)
{
    if (m_LC_Value16 == newLC_Value16)
        return;
    m_LC_Value16 = newLC_Value16;
    emit LC_Value16Changed();
}

QString QR_ProcessDataManager::LeftAngle16() const
{
    return m_LeftAngle16;
}

void QR_ProcessDataManager::setLeftAngle16(const QString &newLeftAngle16)
{
    if (m_LeftAngle16 == newLeftAngle16)
        return;
    m_LeftAngle16 = newLeftAngle16;
    emit LeftAngle16Changed();
}

QString QR_ProcessDataManager::RightAngle16() const
{
    return m_RightAngle16;
}

void QR_ProcessDataManager::setRightAngle16(const QString &newRightAngle16)
{
    if (m_RightAngle16 == newRightAngle16)
        return;
    m_RightAngle16 = newRightAngle16;
    emit RightAngle16Changed();
}

QString QR_ProcessDataManager::Count16() const
{
    return m_Count16;
}

void QR_ProcessDataManager::setCount16(const QString &newCount16)
{
    if (m_Count16 == newCount16)
        return;
    m_Count16 = newCount16;
    emit Count16Changed();
}

QString QR_ProcessDataManager::LC_Value17() const
{
    return m_LC_Value17;
}

void QR_ProcessDataManager::setLC_Value17(const QString &newLC_Value17)
{
    if (m_LC_Value17 == newLC_Value17)
        return;
    m_LC_Value17 = newLC_Value17;
    emit LC_Value17Changed();
}

QString QR_ProcessDataManager::LeftAngle17() const
{
    return m_LeftAngle17;
}

void QR_ProcessDataManager::setLeftAngle17(const QString &newLeftAngle17)
{
    if (m_LeftAngle17 == newLeftAngle17)
        return;
    m_LeftAngle17 = newLeftAngle17;
    emit LeftAngle17Changed();
}

QString QR_ProcessDataManager::RightAngle17() const
{
    return m_RightAngle17;
}

void QR_ProcessDataManager::setRightAngle17(const QString &newRightAngle17)
{
    if (m_RightAngle17 == newRightAngle17)
        return;
    m_RightAngle17 = newRightAngle17;
    emit RightAngle17Changed();
}

QString QR_ProcessDataManager::Count17() const
{
    return m_Count17;
}

void QR_ProcessDataManager::setCount17(const QString &newCount17)
{
    if (m_Count17 == newCount17)
        return;
    m_Count17 = newCount17;
    emit Count17Changed();
}

QString QR_ProcessDataManager::LC_Value18() const
{
    return m_LC_Value18;
}

void QR_ProcessDataManager::setLC_Value18(const QString &newLC_Value18)
{
    if (m_LC_Value18 == newLC_Value18)
        return;
    m_LC_Value18 = newLC_Value18;
    emit LC_Value18Changed();
}

QString QR_ProcessDataManager::LeftAngle18() const
{
    return m_LeftAngle18;
}

void QR_ProcessDataManager::setLeftAngle18(const QString &newLeftAngle18)
{
    if (m_LeftAngle18 == newLeftAngle18)
        return;
    m_LeftAngle18 = newLeftAngle18;
    emit LeftAngle18Changed();
}

QString QR_ProcessDataManager::RightAngle18() const
{
    return m_RightAngle18;
}

void QR_ProcessDataManager::setRightAngle18(const QString &newRightAngle18)
{
    if (m_RightAngle18 == newRightAngle18)
        return;
    m_RightAngle18 = newRightAngle18;
    emit RightAngle18Changed();
}

QString QR_ProcessDataManager::Count18() const
{
    return m_Count18;
}

void QR_ProcessDataManager::setCount18(const QString &newCount18)
{
    if (m_Count18 == newCount18)
        return;
    m_Count18 = newCount18;
    emit Count18Changed();
}

QString QR_ProcessDataManager::LC_Value19() const
{
    return m_LC_Value19;
}

void QR_ProcessDataManager::setLC_Value19(const QString &newLC_Value19)
{
    if (m_LC_Value19 == newLC_Value19)
        return;
    m_LC_Value19 = newLC_Value19;
    emit LC_Value19Changed();
}

QString QR_ProcessDataManager::LeftAngle19() const
{
    return m_LeftAngle19;
}

void QR_ProcessDataManager::setLeftAngle19(const QString &newLeftAngle19)
{
    if (m_LeftAngle19 == newLeftAngle19)
        return;
    m_LeftAngle19 = newLeftAngle19;
    emit LeftAngle19Changed();
}

QString QR_ProcessDataManager::RightAngle19() const
{
    return m_RightAngle19;
}

void QR_ProcessDataManager::setRightAngle19(const QString &newRightAngle19)
{
    if (m_RightAngle19 == newRightAngle19)
        return;
    m_RightAngle19 = newRightAngle19;
    emit RightAngle19Changed();
}

QString QR_ProcessDataManager::Count19() const
{
    return m_Count19;
}

void QR_ProcessDataManager::setCount19(const QString &newCount19)
{
    if (m_Count19 == newCount19)
        return;
    m_Count19 = newCount19;
    emit Count19Changed();
}

QString QR_ProcessDataManager::LC_Value20() const
{
    return m_LC_Value20;
}

void QR_ProcessDataManager::setLC_Value20(const QString &newLC_Value20)
{
    if (m_LC_Value20 == newLC_Value20)
        return;
    m_LC_Value20 = newLC_Value20;
    emit LC_Value20Changed();
}

QString QR_ProcessDataManager::LeftAngle20() const
{
    return m_LeftAngle20;
}

void QR_ProcessDataManager::setLeftAngle20(const QString &newLeftAngle20)
{
    if (m_LeftAngle20 == newLeftAngle20)
        return;
    m_LeftAngle20 = newLeftAngle20;
    emit LeftAngle20Changed();
}

QString QR_ProcessDataManager::RightAngle20() const
{
    return m_RightAngle20;
}

void QR_ProcessDataManager::setRightAngle20(const QString &newRightAngle20)
{
    if (m_RightAngle20 == newRightAngle20)
        return;
    m_RightAngle20 = newRightAngle20;
    emit RightAngle20Changed();
}

QString QR_ProcessDataManager::Count20() const
{
    return m_Count20;
}

void QR_ProcessDataManager::setCount20(const QString &newCount20)
{
    if (m_Count20 == newCount20)
        return;
    m_Count20 = newCount20;
    emit Count20Changed();
}

QString QR_ProcessDataManager::LC_Value06() const
{
    return m_LC_Value06;
}

void QR_ProcessDataManager::setLC_Value06(const QString &newLC_Value06)
{
    if (m_LC_Value06 == newLC_Value06)
        return;
    m_LC_Value06 = newLC_Value06;
    emit LC_Value06Changed();
}

void QR_ProcessDataManager::onReadScannerResult(QStringList result)
{
    // qDebug()<<"  "<<result;
    if((result.length()-1)/4 == 12)
    {
        // qDebug()<<" 长丰二维码数据 ";

        saveData(1,"LC_VALUE",result[1]);
        saveData(1,"LeftAngle",QString::number(result[2].toDouble()));
        saveData(1,"RightAngle",QString::number(result[3].toDouble()));
        saveData(1,"Count",result[4]);

        saveData(2,"LC_VALUE",result[5]);
        saveData(2,"LeftAngle",QString::number(result[6].toDouble()));
        saveData(2,"RightAngle",QString::number(result[7].toDouble()));
        saveData(2,"Count",result[8]);

        saveData(3,"LC_VALUE",result[9]);
        saveData(3,"LeftAngle",QString::number(result[10].toDouble()));
        saveData(3,"RightAngle",QString::number(result[11].toDouble()));
        saveData(3,"Count",result[12]);

        saveData(4,"LC_VALUE",result[13]);
        saveData(4,"LeftAngle",QString::number(result[14].toDouble()));
        saveData(4,"RightAngle",QString::number(result[15].toDouble()));
        saveData(4,"Count",result[16]);

        saveData(5,"LC_VALUE",result[17]);
        saveData(5,"LeftAngle",QString::number(result[18].toDouble()));
        saveData(5,"RightAngle",QString::number(result[19].toDouble()));
        saveData(5,"Count",result[20]);

        saveData(6,"LC_VALUE",result[21]);
        saveData(6,"LeftAngle",QString::number(result[22].toDouble()));
        saveData(6,"RightAngle",QString::number(result[23].toDouble()));
        saveData(6,"Count",result[24]);

        saveData(7,"LC_VALUE",result[25]);
        saveData(7,"LeftAngle",QString::number(result[26].toDouble()));
        saveData(7,"RightAngle",QString::number(result[27].toDouble()));
        saveData(7,"Count",result[28]);

        saveData(8,"LC_VALUE",result[29]);
        saveData(8,"LeftAngle",QString::number(result[30].toDouble()));
        saveData(8,"RightAngle",QString::number(result[31].toDouble()));
        saveData(8,"Count",result[32]);

        saveData(9,"LC_VALUE",result[33]);
        saveData(9,"LeftAngle",QString::number(result[34].toDouble()));
        saveData(9,"RightAngle",QString::number(result[35].toDouble()));
        saveData(9,"Count",result[36]);

        saveData(10,"LC_VALUE",result[37]);
        saveData(10,"LeftAngle",QString::number(result[38].toDouble()));
        saveData(10,"RightAngle",QString::number(result[39].toDouble()));
        saveData(10,"Count",result[40]);

        saveData(11,"LC_VALUE","");
        saveData(11,"LeftAngle","");
        saveData(11,"RightAngle","");
        saveData(11,"Count","");

        saveData(12,"LC_VALUE","");
        saveData(12,"LeftAngle","");
        saveData(12,"RightAngle","");
        saveData(12,"Count","");

        saveData(13,"LC_VALUE","");
        saveData(13,"LeftAngle","");
        saveData(13,"RightAngle","");
        saveData(13,"Count","");

        saveData(14,"LC_VALUE","");
        saveData(14,"LeftAngle","");
        saveData(14,"RightAngle","");
        saveData(14,"Count","");

        saveData(15,"LC_VALUE","");
        saveData(15,"LeftAngle","");
        saveData(15,"RightAngle","");
        saveData(15,"Count","");

        saveData(16,"LC_VALUE","");
        saveData(16,"LeftAngle","");
        saveData(16,"RightAngle","");
        saveData(16,"Count","");

        saveData(17,"LC_VALUE","");
        saveData(17,"LeftAngle","");
        saveData(17,"RightAngle","");
        saveData(17,"Count","");

        saveData(18,"LC_VALUE","");
        saveData(18,"LeftAngle","");
        saveData(18,"RightAngle","");
        saveData(18,"Count","");

        saveData(19,"LC_VALUE","");
        saveData(19,"LeftAngle","");
        saveData(19,"RightAngle","");
        saveData(19,"Count","");

        saveData(20,"LC_VALUE","");
        saveData(20,"LeftAngle","");
        saveData(20,"RightAngle","");
        saveData(20,"Count","");


        getAllParameterFromSQL();

        setScanned(true);

    }
    else if((result.length()-1)/4 == 21)
    {
        qDebug()<<"速制二维码 - 框";

        saveData(1,"LC_VALUE",result[1]);
        saveData(1,"LeftAngle",QString::number(result[2].toDouble()));
        saveData(1,"RightAngle",QString::number(result[3].toDouble()));
        saveData(1,"Count",result[4]);

        saveData(2,"LC_VALUE",result[5]);
        saveData(2,"LeftAngle",QString::number(result[6].toDouble()));
        saveData(2,"RightAngle",QString::number(result[7].toDouble()));
        saveData(2,"Count",result[8]);

        saveData(3,"LC_VALUE",result[9]);
        saveData(3,"LeftAngle",QString::number(result[10].toDouble()));
        saveData(3,"RightAngle",QString::number(result[11].toDouble()));
        saveData(3,"Count",result[12]);

        saveData(4,"LC_VALUE",result[13]);
        saveData(4,"LeftAngle",QString::number(result[14].toDouble()));
        saveData(4,"RightAngle",QString::number(result[15].toDouble()));
        saveData(4,"Count",result[16]);

        saveData(5,"LC_VALUE",result[17]);
        saveData(5,"LeftAngle",QString::number(result[18].toDouble()));
        saveData(5,"RightAngle",QString::number(result[19].toDouble()));
        saveData(5,"Count",result[20]);

        saveData(6,"LC_VALUE",result[21]);
        saveData(6,"LeftAngle",QString::number(result[22].toDouble()));
        saveData(6,"RightAngle",QString::number(result[23].toDouble()));
        saveData(6,"Count",result[24]);

        saveData(7,"LC_VALUE",result[25]);
        saveData(7,"LeftAngle",QString::number(result[26].toDouble()));
        saveData(7,"RightAngle",QString::number(result[27].toDouble()));
        saveData(7,"Count",result[28]);

        saveData(8,"LC_VALUE",result[29]);
        saveData(8,"LeftAngle",QString::number(result[30].toDouble()));
        saveData(8,"RightAngle",QString::number(result[31].toDouble()));
        saveData(8,"Count",result[32]);

        saveData(9,"LC_VALUE",result[33]);
        saveData(9,"LeftAngle",QString::number(result[34].toDouble()));
        saveData(9,"RightAngle",QString::number(result[35].toDouble()));
        saveData(9,"Count",result[36]);

        saveData(10,"LC_VALUE",result[37]);
        saveData(10,"LeftAngle",QString::number(result[38].toDouble()));
        saveData(10,"RightAngle",QString::number(result[39].toDouble()));
        saveData(10,"Count",result[40]);

        saveData(11,"LC_VALUE",result[41]);
        saveData(11,"LeftAngle",QString::number(result[42].toDouble()));
        saveData(11,"RightAngle",QString::number(result[43].toDouble()));
        saveData(11,"Count",result[44]);

        saveData(12,"LC_VALUE",result[45]);
        saveData(12,"LeftAngle",QString::number(result[46].toDouble()));
        saveData(12,"RightAngle",QString::number(result[47].toDouble()));
        saveData(12,"Count",result[48]);

        saveData(13,"LC_VALUE",result[49]);
        saveData(13,"LeftAngle",QString::number(result[50].toDouble()));
        saveData(13,"RightAngle",QString::number(result[51].toDouble()));
        saveData(13,"Count",result[52]);

        saveData(14,"LC_VALUE",result[53]);
        saveData(14,"LeftAngle",QString::number(result[54].toDouble()));
        saveData(14,"RightAngle",QString::number(result[55].toDouble()));
        saveData(14,"Count",result[56]);

        saveData(15,"LC_VALUE",result[57]);
        saveData(15,"LeftAngle",QString::number(result[58].toDouble()));
        saveData(15,"RightAngle",QString::number(result[59].toDouble()));
        saveData(15,"Count",result[60]);

        saveData(16,"LC_VALUE",result[61]);
        saveData(16,"LeftAngle",QString::number(result[62].toDouble()));
        saveData(16,"RightAngle",QString::number(result[63].toDouble()));
        saveData(16,"Count",result[64]);

        saveData(17,"LC_VALUE",result[65]);
        saveData(17,"LeftAngle",QString::number(result[66].toDouble()));
        saveData(17,"RightAngle",QString::number(result[67].toDouble()));
        saveData(17,"Count",result[68]);

        saveData(18,"LC_VALUE",result[69]);
        saveData(18,"LeftAngle",QString::number(result[70].toDouble()));
        saveData(18,"RightAngle",QString::number(result[71].toDouble()));
        saveData(18,"Count",result[72]);

        saveData(19,"LC_VALUE",result[73]);
        saveData(19,"LeftAngle",QString::number(result[74].toDouble()));
        saveData(19,"RightAngle",QString::number(result[75].toDouble()));
        saveData(19,"Count",result[76]);

        saveData(20,"LC_VALUE",result[77]);
        saveData(20,"LeftAngle",QString::number(result[78].toDouble()));
        saveData(20,"RightAngle",QString::number(result[79].toDouble()));
        saveData(20,"Count",result[80]);

        getAllParameterFromSQL();

        setScanned(true);
    }
    else if((result.length()-1)/4 == 22)
    {
        qDebug()<<"速制二维码 - 扇";

        saveData(1,"LC_VALUE",result[1]);
        saveData(1,"LeftAngle",QString::number(result[2].toDouble()));
        saveData(1,"RightAngle",QString::number(result[3].toDouble()));
        saveData(1,"Count",result[4]);

        saveData(2,"LC_VALUE",result[5]);
        saveData(2,"LeftAngle",QString::number(result[6].toDouble()));
        saveData(2,"RightAngle",QString::number(result[7].toDouble()));
        saveData(2,"Count",result[8]);

        saveData(3,"LC_VALUE",result[9]);
        saveData(3,"LeftAngle",QString::number(result[10].toDouble()));
        saveData(3,"RightAngle",QString::number(result[11].toDouble()));
        saveData(3,"Count",result[12]);

        saveData(4,"LC_VALUE",result[13]);
        saveData(4,"LeftAngle",QString::number(result[14].toDouble()));
        saveData(4,"RightAngle",QString::number(result[15].toDouble()));
        saveData(4,"Count",result[16]);

        saveData(5,"LC_VALUE",result[17]);
        saveData(5,"LeftAngle",QString::number(result[18].toDouble()));
        saveData(5,"RightAngle",QString::number(result[19].toDouble()));
        saveData(5,"Count",result[20]);

        saveData(6,"LC_VALUE",result[21]);
        saveData(6,"LeftAngle",QString::number(result[22].toDouble()));
        saveData(6,"RightAngle",QString::number(result[23].toDouble()));
        saveData(6,"Count",result[24]);

        saveData(7,"LC_VALUE",result[25]);
        saveData(7,"LeftAngle",QString::number(result[26].toDouble()));
        saveData(7,"RightAngle",QString::number(result[27].toDouble()));
        saveData(7,"Count",result[28]);

        saveData(8,"LC_VALUE",result[29]);
        saveData(8,"LeftAngle",QString::number(result[30].toDouble()));
        saveData(8,"RightAngle",QString::number(result[31].toDouble()));
        saveData(8,"Count",result[32]);

        saveData(9,"LC_VALUE",result[33]);
        saveData(9,"LeftAngle",QString::number(result[34].toDouble()));
        saveData(9,"RightAngle",QString::number(result[35].toDouble()));
        saveData(9,"Count",result[36]);

        saveData(10,"LC_VALUE",result[37]);
        saveData(10,"LeftAngle",QString::number(result[38].toDouble()));
        saveData(10,"RightAngle",QString::number(result[39].toDouble()));
        saveData(10,"Count",result[40]);

        saveData(11,"LC_VALUE",result[41]);
        saveData(11,"LeftAngle",QString::number(result[42].toDouble()));
        saveData(11,"RightAngle",QString::number(result[43].toDouble()));
        saveData(11,"Count",result[44]);

        saveData(12,"LC_VALUE",result[45]);
        saveData(12,"LeftAngle",QString::number(result[46].toDouble()));
        saveData(12,"RightAngle",QString::number(result[47].toDouble()));
        saveData(12,"Count",result[48]);

        saveData(13,"LC_VALUE",result[49]);
        saveData(13,"LeftAngle",QString::number(result[50].toDouble()));
        saveData(13,"RightAngle",QString::number(result[51].toDouble()));
        saveData(13,"Count",result[52]);

        saveData(14,"LC_VALUE",result[53]);
        saveData(14,"LeftAngle",QString::number(result[54].toDouble()));
        saveData(14,"RightAngle",QString::number(result[55].toDouble()));
        saveData(14,"Count",result[56]);

        saveData(15,"LC_VALUE",result[57]);
        saveData(15,"LeftAngle",QString::number(result[58].toDouble()));
        saveData(15,"RightAngle",QString::number(result[59].toDouble()));
        saveData(15,"Count",result[60]);

        saveData(16,"LC_VALUE",result[61]);
        saveData(16,"LeftAngle",QString::number(result[62].toDouble()));
        saveData(16,"RightAngle",QString::number(result[63].toDouble()));
        saveData(16,"Count",result[64]);

        saveData(17,"LC_VALUE",result[65]);
        saveData(17,"LeftAngle",QString::number(result[66].toDouble()));
        saveData(17,"RightAngle",QString::number(result[67].toDouble()));
        saveData(17,"Count",result[68]);

        saveData(18,"LC_VALUE",result[69]);
        saveData(18,"LeftAngle",QString::number(result[70].toDouble()));
        saveData(18,"RightAngle",QString::number(result[71].toDouble()));
        saveData(18,"Count",result[72]);

        saveData(19,"LC_VALUE",result[73]);
        saveData(19,"LeftAngle",QString::number(result[74].toDouble()));
        saveData(19,"RightAngle",QString::number(result[75].toDouble()));
        saveData(19,"Count",result[76]);

        saveData(20,"LC_VALUE",result[77]);
        saveData(20,"LeftAngle",QString::number(result[78].toDouble()));
        saveData(20,"RightAngle",QString::number(result[79].toDouble()));
        saveData(20,"Count",result[80]);


        getAllParameterFromSQL();

        setScanned(true);
    }



}


bool QR_ProcessDataManager::scanned() const
{
    return m_scanned;
}

void QR_ProcessDataManager::setScanned(bool newScanned)
{
    if (m_scanned == newScanned)
        return;
    m_scanned = newScanned;
    emit scannedChanged();
}
